<template>
  <div>
     <List :listinfo="product"></List>
    <Recommend></Recommend>
  </div>
</template>

<script>
  import List from '../../components/List.vue'
  import Recommend from '../../components/Recommend.vue'
  export default{
    name:'Home',
    data(){
      return{
          product:[]
      }
    },
    components:{List,Recommend},
    mounted(){
      this.jsonhome("/static/api/home.json");
    },
    methods:{
      jsonhome(url){
        this.$axios.get(url,{
        }).then((res)=>{
          this.product=res.data.data.listInfo;
         /* console.info(this.product); */
        }).catch(err=>{
          console.info(err);
        })
      }


    }

  }
</script>

<style>
</style>
